<template>
    <div class="detail">
        <CrumbLVue/>
        <div class="detail_box">
            <DetailLeftVue />
            <DetailCenterVue :req="req"/>
            <DetailRightVue :aid="1" />
        </div>
        <div class="bottom">
            <BottomNavVue :uid="2" :req="req"/>
        </div>

        <!-- <div>{{$route.params.id}}</div> -->
    </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import CrumbLVue from '@/components/CrumbL.vue'
import DetailLeftVue from '@/components/DetailLeft.vue';
import DetailRightVue from '@/components/DetailRight.vue';
import BottomNavVue from '@/components/BottomNav.vue';
import { getShopData } from '@/utils/api';
import DetailCenterVue from '@/components/DetailCenter.vue';

export default defineComponent({
    name: "LotDetail",
    components: {
        CrumbLVue,
        DetailLeftVue,
        DetailRightVue,
        DetailCenterVue,
        BottomNavVue,
    },
    data() {
        return {
            aid: 0,
            req:[] as Array<object>
        }
    },

    methods: {
        // getData(aid: any) {
        //     let aid=this.$route.params.id 
        //     // let result;
        //     // getarticle(this.aid).then((res) => {
        //     //     if (res.status === 200) {
        //     //         result = res.data;
        //     //     }
        //     // });
        //     // console.log(aid);
        //     // return result;
        // },
        // getShop() {
        //     // let id=this.$route.params.id 
        //     let gid = 7
        //     //根据路由传过来的aid获取对应的拍品信息
        //     //发起Ajax请求
        //     getShopData(gid).then((res) => {
        //         if (res.status === 200) {
        //             console.log(res)
        //             console.log(this)
        //             this.request = res.data
        //     }});
        // },
    },
    mounted() {
        let id=this.$route.params.id
        console.log('sss',id)
        // let id = 7
            //根据路由传过来的aid获取对应的拍品信息
            //发起Ajax请求
            getShopData(id).then((res) => {
                if (res.status === 200) {
                    this.req.push(res.data)
            }});
            console.log("@@@1",this.req)
    }
})
</script>

<style lang="scss" scoped>
.detail_box {
    width: 1200px;
    display: flex;
    padding-top: 20px;
    margin: 0 auto 40px;
    justify-content: space-between;
}
</style>